﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Http.Results;
using System.Web.Mvc;
using AotoFacDto.Input;
using AotoFacDto.OutPut;
using IAotoFacLogic.User;

namespace AotoFacWebApi.Controllers
{
    public class HomeController : ApiController
    {

       
        public readonly IUserLogic UserLogic;
        public HomeController(IUserLogic userLogic)
        {
            UserLogic = userLogic;
        }
        public JsonResult<UserAddOutputDto> Index()
        {
         //   ViewBag.Title = "Home Page";

            var result = UserLogic.UserAdd(new UserAddInputDto() { Name = "xiaoming", Age = 12, Sex = "nv" });
            return Json(result);
        }


    }
}
